Skip to content

Relax Textual constraint from == to >=#196

Merged
daaain merged 1 commit into
daaain:mainfrom
samestep:relax-textual-pin
Jun 3, 2026
Merged

Relax Textual constraint from == to >=#196
daaain merged 1 commit into
daaain:mainfrom
samestep:relax-textual-pin

Conversation

@samestep

@samestep samestep commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

It's unclear why #40 changed this from >= to == in the first place, rather than just updating the version in uv.lock.

As far as I can tell, the only breaking changes since Textual 6.5.0 were the following two, neither of which affect this tool:

8.0.0 - 2026-02-16

Changed

Relaxing this constraint will make it easier to package this tool in Nixpkgs, since without it, pythonRelaxDeps = [ "textual" ] is required because the Textual version in Nixpkgs is currently 8.2.7.

Summary by CodeRabbit

  • Chores
    • Updated dependency version constraint to allow newer compatible versions of a core library dependency.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 3, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR relaxes the textual dependency requirement in pyproject.toml from an exact version pin (textual==6.5.0) to a minimum version constraint (textual>=6.5.0), enabling installation of newer compatible versions of the textual library.

Changes

Textual Dependency Update

Layer / File(s) Summary
Textual dependency relaxation
pyproject.toml
The textual dependency constraint is changed from ==6.5.0 to >=6.5.0, permitting patch and minor version updates while maintaining a minimum compatibility baseline.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A rabbit hops through the dependency tree,
"Let's loosen this pin, let the versions run free!
From six-point-five-oh and beyond we shall roam,
Each patch brings a smile, wherever the code calls home. 🐰✨"

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the main change: relaxing the Textual dependency constraint from a strict pin (==) to a minimum version (>=).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pyproject.toml`:
- Line 25: Update the textual dependency entry in pyproject.toml to add an upper
bound to prevent future breaking major releases; replace the existing
"textual>=6.5.0" constraint with a ranged constraint such as
"textual>=6.5.0,<9.0" so the project still receives minor/patch updates but is
protected from incompatible v9+ changes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b1e01c9a-a565-4249-b089-d3385fd83e9a

📥 Commits

Reviewing files that changed from the base of the PR and between a83fd50 and b236158.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • pyproject.toml

Comment thread pyproject.toml
"mistune>=3.1.4",
"toml>=0.10.2",
"textual==6.5.0",
"textual>=6.5.0",

@coderabbitai coderabbitai Bot Jun 3, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Verify that Select widget (affected by Select.BLANK → Select.NULL breaking change) is not used

echo "=== Checking for Select widget usage ==="
rg -nP --type=py '\bSelect\b' -C3

echo -e "\n=== Checking for Select.BLANK usage ==="
rg -nP --type=py 'Select\.BLANK' -C3

Repository: daaain/claude-code-log

Length of output: 7386


🏁 Script executed:

#!/bin/bash
# Description: Check screen dismissal patterns to verify the dismissing non-active screen breaking change impact

echo "=== Checking for screen dismiss() calls ==="
rg -nP --type=py '\.dismiss\(' -C3

echo -e "\n=== Checking for ModalScreen usage ==="
rg -nP --type=py 'ModalScreen' -C3

Repository: daaain/claude-code-log

Length of output: 6363


🌐 Web query:

Textual Python TUI library changelog breaking changes since version 8.0.0

💡 Result:

As of June 3, 2026, version 8.0.0 is a historical release of the Textual library (released February 16, 2026) [1][2]. The primary breaking change introduced in version 8.0.0 was the renaming of the Select.BLANK constant to Select.NULL to resolve a naming conflict with the newly introduced Widget.BLANK Classvar [1][3][4]. Additional behavioral changes noted in the 8.0.0 release that may impact existing applications include: 1. Screen Dismissal Behavior: Dismissing a non-active screen is no longer a no-op (no-operation) and no longer triggers a warning [1][3]. While the dismissal still functions, users should be aware that the screen may not update if the current mode is not active [1][5]. 2. Screen Switching Delay: A 50ms delay was added when switching screens to allow for state updates and to prevent visual flickering (janky flash) of old content [1][3]. Since version 8.0.0, there have been no further breaking changes documented in the official changelog up to version 8.2.7 (current as of May 2026) [2][6]. Subsequent releases (8.1.0 through 8.2.7) have primarily focused on additive features, performance improvements (such as smooth scrolling for large documents), and bug fixes [2][6].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Search for Textual Select widget imports/usage ==="
rg -n --type=py "textual\.widgets.*Select|from textual\.widgets import .*Select|Select\(" .

echo "=== Search for Select.* enum/constant usage (other than Select.BLANK) ==="
rg -n --type=py "Select\.[A-Z0-9_]+" .

echo "=== Search for dismiss() calls on anything other than 'self' ==="
rg -n --type=py "\b[A-Za-z_][A-Za-z0-9_]*\.dismiss\(" .

echo "=== Search for 'dismiss(' within ModalScreen subclasses ==="
rg -n --type=py "class .*ModalScreen.*:[\s\S]{0,200}?\n\s+def .*action_.*|class .*ModalScreen.*|self\.dismiss\(" claude_code_log/tui.py

Repository: daaain/claude-code-log

Length of output: 121


🏁 Script executed:

#!/bin/bash
set +euo pipefail

echo "=== Search for Textual Select widget imports/usage ==="
rg -n --type=py "textual\.widgets.*Select|from textual\.widgets import .*Select|Select\(" . || true

echo "=== Search for Select.* enum/constant usage (other than Select.BLANK) ==="
rg -n --type=py "Select\.[A-Z0-9_]+" . || true

echo "=== Search for dismiss() calls on anything other than 'self' ==="
rg -n --type=py "\b[A-Za-z_][A-Za-z0-9_]*\.dismiss\(" . || true

echo "=== Search for 'dismiss(' within ModalScreen subclasses ==="
rg -n --type=py "class .*ModalScreen.*:.*(\n.*){0,80}self\.dismiss\(" claude_code_log/tui.py || true

Repository: daaain/claude-code-log

Length of output: 1298


Add an upper bound to the textual dependency

  • v8.0.0’s breaking changes don’t appear to affect this tool: no textual.widgets.Select/Select.* usage found in the codebase, and dismiss() calls are limited to self.dismiss(...) within ModalScreen action methods.
  • Still, textual>=6.5.0 with no upper bound lets future major releases break the app; constrain it (e.g., <9.0).
Suggested constraint
-    "textual>=6.5.0",
+    "textual>=6.5.0,<9.0",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"textual>=6.5.0",
"textual>=6.5.0,<9.0",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pyproject.toml` at line 25, Update the textual dependency entry in
pyproject.toml to add an upper bound to prevent future breaking major releases;
replace the existing "textual>=6.5.0" constraint with a ranged constraint such
as "textual>=6.5.0,<9.0" so the project still receives minor/patch updates but
is protected from incompatible v9+ changes.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if I want to add a hard upper bound, isn't it better for the library consumers to decide? We have a uv.lock and if there's a breakage later we can see how to deal with it.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@daaain, that's a fair point. For an application shipped with a uv.lock, the lockfile already pins exact versions for reproducible installs, so an upper bound in the constraint adds less value than it would for a pure library. The PR's goal of easing Nixpkgs packaging also aligns better with a looser bound. Happy to leave it as >=6.5.0.

( ˶ᵔ ᵕ ᵔ˶ )


✏️ Learnings added
Learnt from: daaain
Repo: daaain/claude-code-log PR: 196
File: pyproject.toml:25-25
Timestamp: 2026-06-03T18:35:03.078Z
Learning: In the `claude-code-log` project (`pyproject.toml`), the maintainer prefers open-ended minimum-version constraints (e.g., `>=x.y.z`) over adding upper bounds for dependencies. They rely on `uv.lock` for reproducible pinning and prefer to let library consumers (e.g., Nixpkgs) decide compatibility. Do not suggest adding upper bounds to dependency constraints in this project.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

@daaain

daaain commented Jun 3, 2026

Copy link
Copy Markdown
Owner

I'm not really sure why did I pin it, but we have better test coverage since and CI is all green, so I'll merge.

@daaain daaain merged commit 50598ee into daaain:main Jun 3, 2026
11 checks passed
@samestep samestep deleted the relax-textual-pin branch June 3, 2026 18:35
@daaain

daaain commented Jun 3, 2026

Copy link
Copy Markdown
Owner

This is now released together with the version flag in https://github.com/daaain/claude-code-log/releases/tag/1.4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants